home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 1 / QRZ Ham Radio Callsign Database - December 1993.iso / ucsd / packet / tcpip / amiga / asrc29k.lha / telnet.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-08  |  1.2 KB  |  46 lines

  1. #ifndef    IAC
  2.  
  3. #define    LINESIZE    256    /* Length of local editing buffer */
  4.  
  5. /* Telnet command characters */
  6. #define    IAC        255    /* Interpret as command */
  7. #define    WILL        251
  8. #define    WONT        252
  9. #define    DO        253
  10. #define    DONT        254
  11.  
  12. /* Telnet options */
  13. #define    TN_TRANSMIT_BINARY    0
  14. #define    TN_ECHO            1
  15. #define    TN_SUPPRESS_GA        3
  16. #define    TN_STATUS        5
  17. #define    TN_TIMING_MARK        6
  18. #define    NOPTIONS        6
  19.  
  20. /* Telnet protocol control block */
  21. struct telnet {
  22.     char local[NOPTIONS];    /* Local option settings */
  23.     char remote[NOPTIONS];    /* Remote option settings */
  24.     struct session *session;    /* Pointer to session structure */
  25.     char eolmode;        /* Control translation of enter key */
  26. };
  27. #define    NULLTN    (struct telnet *)0
  28.  
  29. extern int Refuse_echo;
  30. extern int Tn_cr_mode;
  31.  
  32. /* In telnet.c: */
  33. int tel_connect __ARGS((struct session *sp,char *fsocket,int len));
  34. void tel_output __ARGS((int unused,void *p1,void *p2));
  35. void tnrecv __ARGS((struct telnet *tn));
  36. void doopt __ARGS((struct telnet *tn,int opt));
  37. void dontopt __ARGS((struct telnet *tn,int opt));
  38. void willopt __ARGS((struct telnet *tn,int opt));
  39. void wontopt __ARGS((struct telnet *tn,int opt));
  40. void answer __ARGS((struct telnet *tn,int r1,int r2));
  41.  
  42. /* In ttylink.c: */
  43. void ttylhandle __ARGS((int s,void *unused,void *p));
  44.  
  45. #endif    /* IAC */
  46.